package com.joolun.weixin.constant;

import lombok.Getter;

@Getter
public enum YesNoEnum {

	/**
	 *
	 */
	YES("Y"),

	NO("N"),
	;

	private final String value;

	YesNoEnum(String value) {
		this.value = value.toUpperCase();
	}

	public static YesNoEnum fromValue(String value) {
		YesNoEnum[] types = values();
		for (YesNoEnum type : types) {
			if (type.getValue().equalsIgnoreCase(value)) {
				return type;
			}
		}
		return null;
	}

}
